﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MamiMasterPage.master" AutoEventWireup="true"
    CodeFile="Categories.aspx.cs" Inherits="Administration_Categories" EnableViewState="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/CustomControls/SiteNavigation.ascx" TagName="SiteNavigation"
    TagPrefix="mami" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentHolder" runat="Server">
    <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc1:ToolkitScriptManager>
    <div id="breadcrumbs">
        <a href="default.aspx">Administrare</a> » <a href="Categories.aspx">Editare categorii</a>
        <asp:Literal ID="litNav" runat="server" Visible="true"></asp:Literal>
    </div>
    <div class="container">
        <h1>
            <asp:Literal ID="litTitle" runat="server" /></h1>
        <div class="center red bold">
            <asp:Literal ID="litMessage" runat="server" /></div>
        <asp:Panel ID="pnlEdit" runat="server" Visible="false">
            <table width="100%" cellpadding="0" cellspacing="4" border="0">
                <tr>
                    <td>
                        Titlu
                    </td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" Width="100%" />
                    </td>
                    <td rowspan="5" valign="top">
                        <asp:Image ID="imgCateg" runat="server" /><br />
                        Incarca alta imagine<br />
                        <asp:FileUpload ID="uplImage" runat="server" /><br />
                        Categorie parinte<br />
                        <asp:DropDownList ID="ddlParentCateg" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        Descriere
                    </td>
                    <td>
                        <cc2:Editor ID="htmlDescription" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Meta Descriere
                    </td>
                    <td>
                        <asp:TextBox ID="txtWebDesc" runat="server" TextMode="MultiLine" Rows="2" Width="100%" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Cuvinte cheie
                    </td>
                    <td>
                        <asp:TextBox ID="txtKeys" runat="server" TextMode="MultiLine" Rows="2" Width="100%" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Ordine in meniu
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlMenuOrdinal" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        
                    </td>
                    <td>
                        <asp:CheckBox ID="chApproved" runat="server" Text="Aprobat pentru afisare pe site" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:CheckBox ID="chFeatured" Text="Apare pe prima pagina" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnUpdate" runat="server" Text="Modifica" OnClick="btnUpdate_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <div class="cat-index">
            <asp:TextBox ID="txtSearch" runat="server" />
            <asp:Button Text="Cauta" ID="btnSearch" runat="server" OnClick="btnSearch_Click" />
            <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtSearch"
                ServiceMethod="GetCompletionList" UseContextKey="True">
            </cc1:AutoCompleteExtender>
            <asp:DataList ID="dlSubCategories" runat="server" GridLines="None" RepeatColumns="2"
                ItemStyle-VerticalAlign="Top" RepeatDirection="Horizontal" RepeatLayout="Table"
                OnItemDataBound="dlSubCategories_ItemDataBound" ShowHeader="false">
                <HeaderTemplate>
                    <h2>
                        Sub categorii</h2>
                </HeaderTemplate>
                <ItemTemplate>
                    <div>
                        <h2>
                            <a href="categories.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>"
                                title="<%# DataBinder.Eval(Container.DataItem, "Title") %>">
                                <%# DataBinder.Eval(Container.DataItem, "Title") %></a></h2>
                        <asp:Repeater ID="subsubCategories" runat="server">
                            <HeaderTemplate>
                                <ul>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <li><a href="categories.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>"
                                    title="<%# DataBinder.Eval(Container.DataItem, "Title") %>">
                                    <%# DataBinder.Eval(Container.DataItem, "Title") %></a></li>
                            </ItemTemplate>
                            <FooterTemplate>
                                </ul>
                            </FooterTemplate>
                        </asp:Repeater>
                    </div>
                </ItemTemplate>
            </asp:DataList>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="SiteStructure" runat="Server">
    <mami:SiteNavigation ID="SiteNavigation" runat="server" />
</asp:Content>
